
<!DOCTYPE HTML>
<html lang="zh-hans" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>nginx02安装 · Nginx</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        <meta name="author" content="<yangxin19970404@163.com>">
        
        
    
    <link rel="stylesheet" href="gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-search/search.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="nginx03Nginx常用命令.html" />
    
    
    <link rel="prev" href="nginx01代理.html" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="输入并搜索" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="./">
            
                <a href="./">
            
                    
                    Introduction
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="nginx01代理.html">
            
                <a href="nginx01代理.html">
            
                    
                    nginx01代理
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="1.3" data-path="nginx02安装.html">
            
                <a href="nginx02安装.html">
            
                    
                    nginx02安装
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="nginx03Nginx常用命令.html">
            
                <a href="nginx03Nginx常用命令.html">
            
                    
                    nginx03Nginx常用命令
            
                </a>
            

            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            本书使用 GitBook 发布
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="." >nginx02安装</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h3 id="nginx&#x7684;&#x5B89;&#x88C5;">Nginx&#x7684;&#x5B89;&#x88C5;</h3>
<blockquote>
<p>windows&#x4E0B;&#x5B89;&#x88C5;</p>
</blockquote>
<p>1&#x3001;&#x4E0B;&#x8F7D;nginx</p>
<p><a href="http://nginx.org/en/download.html" target="_blank">http://nginx.org/en/download.html</a> &#x4E0B;&#x8F7D;&#x7A33;&#x5B9A;&#x7248;&#x672C;&#x3002;
&#x4EE5;nginx/Windows-1.16.1&#x4E3A;&#x4F8B;&#xFF0C;&#x76F4;&#x63A5;&#x4E0B;&#x8F7D; nginx-1.16.1.zip&#x3002;
&#x4E0B;&#x8F7D;&#x540E;&#x89E3;&#x538B;&#xFF0C;</p>
<p>2&#x3001;&#x542F;&#x52A8;nginx</p>
<p>&#x6709;&#x5F88;&#x591A;&#x79CD;&#x65B9;&#x6CD5;&#x542F;&#x52A8;nginx</p>
<p>(1)&#x76F4;&#x63A5;&#x53CC;&#x51FB;nginx.exe&#xFF0C;&#x53CC;&#x51FB;&#x540E;&#x4E00;&#x4E2A;&#x9ED1;&#x8272;&#x7684;&#x5F39;&#x7A97;&#x4E00;&#x95EA;&#x800C;&#x8FC7;</p>
<p>(2)&#x6253;&#x5F00;cmd&#x547D;&#x4EE4;&#x7A97;&#x53E3;&#xFF0C;&#x5207;&#x6362;&#x5230;nginx&#x89E3;&#x538B;&#x76EE;&#x5F55;&#x4E0B;&#xFF0C;&#x8F93;&#x5165;&#x547D;&#x4EE4; nginx.exe &#xFF0C;&#x56DE;&#x8F66;&#x5373;&#x53EF;</p>
<p>3&#x3001;&#x68C0;&#x67E5;nginx&#x662F;&#x5426;&#x542F;&#x52A8;&#x6210;&#x529F;</p>
<p>&#x76F4;&#x63A5;&#x5728;&#x6D4F;&#x89C8;&#x5668;&#x5730;&#x5740;&#x680F;&#x8F93;&#x5165;&#x7F51;&#x5740; <a href="http://localhost:80" target="_blank">http://localhost:80</a> &#x56DE;&#x8F66;&#xFF0C;&#x51FA;&#x73B0;&#x4EE5;&#x4E0B;&#x9875;&#x9762;&#x8BF4;&#x660E;&#x542F;&#x52A8;&#x6210;&#x529F;&#xFF01;</p>
<p><img src="./imgs/&#x5FAE;&#x4FE1;&#x622A;&#x56FE;_20210325134653.png" alt=""></p>
<p>4&#x3001;&#x914D;&#x7F6E;&#x76D1;&#x542C;</p>
<p>nginx&#x7684;&#x914D;&#x7F6E;&#x6587;&#x4EF6;&#x662F;conf&#x76EE;&#x5F55;&#x4E0B;&#x7684;nginx.conf&#xFF0C;&#x9ED8;&#x8BA4;&#x914D;&#x7F6E;&#x7684;nginx&#x76D1;&#x542C;&#x7684;&#x7AEF;&#x53E3;&#x4E3A;80&#xFF0C;&#x5982;&#x679C;80&#x7AEF;&#x53E3;&#x88AB;&#x5360;&#x7528;&#x53EF;&#x4EE5;&#x4FEE;&#x6539;&#x4E3A;&#x672A;&#x88AB;&#x5360;&#x7528;&#x7684;&#x7AEF;&#x53E3;&#x5373;&#x53EF;&#x3002;
<img src="./imgs/&#x5FAE;&#x4FE1;&#x622A;&#x56FE;_20210325134730.png" alt="">
&#x5F53;&#x6211;&#x4EEC;&#x4FEE;&#x6539;&#x4E86;nginx&#x7684;&#x914D;&#x7F6E;&#x6587;&#x4EF6;nginx.conf &#x65F6;&#xFF0C;&#x4E0D;&#x9700;&#x8981;&#x5173;&#x95ED;nginx&#x540E;&#x91CD;&#x65B0;&#x542F;&#x52A8;nginx&#xFF0C;&#x53EA;&#x9700;&#x8981;&#x6267;&#x884C;&#x547D;&#x4EE4; nginx -s reload &#x5373;&#x53EF;&#x8BA9;&#x6539;&#x52A8;&#x751F;&#x6548;</p>
<p>5&#x3001;&#x5173;&#x95ED;nginx</p>
<p>&#x5982;&#x679C;&#x4F7F;&#x7528;cmd&#x547D;&#x4EE4;&#x7A97;&#x53E3;&#x542F;&#x52A8;nginx&#xFF0C; &#x5173;&#x95ED;cmd&#x7A97;&#x53E3;&#x662F;&#x4E0D;&#x80FD;&#x7ED3;&#x675F;nginx&#x8FDB;&#x7A0B;&#x7684;&#xFF0C;&#x53EF;&#x4F7F;&#x7528;&#x4E24;&#x79CD;&#x65B9;&#x6CD5;&#x5173;&#x95ED;nginx</p>
<p>(1)&#x8F93;&#x5165;nginx&#x547D;&#x4EE4; nginx -s stop(&#x5FEB;&#x901F;&#x505C;&#x6B62;nginx) &#x6216; nginx -s quit(&#x5B8C;&#x6574;&#x6709;&#x5E8F;&#x7684;&#x505C;&#x6B62;nginx)</p>
<p>(2)&#x4F7F;&#x7528;taskkill taskkill /f /t /im nginx.exe</p>
<pre><code class="lang-bash">taskkill&#x662F;&#x7528;&#x6765;&#x7EC8;&#x6B62;&#x8FDB;&#x7A0B;&#x7684;&#xFF0C;
/f&#x662F;&#x5F3A;&#x5236;&#x7EC8;&#x6B62; .
/t&#x7EC8;&#x6B62;&#x6307;&#x5B9A;&#x7684;&#x8FDB;&#x7A0B;&#x548C;&#x4EFB;&#x4F55;&#x7531;&#x6B64;&#x542F;&#x52A8;&#x7684;&#x5B50;&#x8FDB;&#x7A0B;&#x3002;
/im&#x793A;&#x6307;&#x5B9A;&#x7684;&#x8FDB;&#x7A0B;&#x540D;&#x79F0; .
</code></pre>
<blockquote>
<p>linux&#x4E0B;&#x5B89;&#x88C5;</p>
</blockquote>
<ol>
<li><p>&#x4E0B;&#x8F7D;&#x5B89;&#x88C5;&#x5305;</p>
<p> &#x624B;&#x52A8;&#x4E0B;&#x8F7D;.tar.gz&#x5B89;&#x88C5;&#x5305;&#xFF0C;&#x5730;&#x5740;&#xFF1A;<a href="https://nginx.org/en/download.html" target="_blank">https://nginx.org/en/download.html</a></p>
</li>
<li><p>&#x89E3;&#x538B;</p>
</li>
</ol>
<pre><code class="lang-bash">tar -zxvf nginx-1.18.0.tar.gz
<span class="hljs-built_in">cd</span> nginx-1.18.0
</code></pre>
<ol>
<li>&#x914D;&#x7F6E;</li>
</ol>
<p>&#x4F7F;&#x7528;&#x9ED8;&#x8BA4;&#x914D;&#x7F6E;&#xFF0C;&#x5728;nginx&#x6839;&#x76EE;&#x5F55;&#x4E0B;&#x6267;&#x884C;</p>
<pre><code class="lang-bash">./configure
make
make install
</code></pre>

                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="nginx01代理.html" class="navigation navigation-prev " aria-label="Previous page: nginx01代理">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="nginx03Nginx常用命令.html" class="navigation navigation-next " aria-label="Next page: nginx03Nginx常用命令">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"nginx02安装","level":"1.3","depth":1,"next":{"title":"nginx03Nginx常用命令","level":"1.4","depth":1,"path":"nginx03Nginx常用命令.md","ref":"nginx03Nginx常用命令.md","articles":[]},"previous":{"title":"nginx01代理","level":"1.2","depth":1,"path":"nginx01代理.md","ref":"nginx01代理.md","articles":[]},"dir":"ltr"},"config":{"plugins":[],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"theme":"default","author":"<yangxin19970404@163.com>","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"Nginx","language":"zh-hans","gitbook":"3.2.3","description":"Nginx..."},"file":{"path":"nginx02安装.md","mtime":"2021-03-25T11:59:50.075Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2021-04-17T07:49:58.187Z"},"basePath":".","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="gitbook/gitbook.js"></script>
    <script src="gitbook/theme.js"></script>
    
        
        <script src="gitbook/gitbook-plugin-search/search-engine.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-search/search.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

